﻿<?php
/*
*Name:php cute proxy
*Desc:A proxy script you can HTTP HTTPS get post to traverse the entire network
*/
error_reporting(0);

$rurl=$_GET['rurl'];
if($rurl){

	$rtype=(isset($_GET['rtype'])) ? $_GET['rtype'] : "get";
	$lurl=$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'];
	$luri="?".substr($_SERVER["QUERY_STRING"],strlen("rurl=".$rurl)+1);
	$curl=$rurl.$luri;
	echo  "<font color=green>Type:$rtype  Url:$curl</font><br>";

	switch ($rtype) {
		case "get"  : get($curl); break;
		case "post" : post($curl,$_GET); break;

	}




}else{

	echo  "[+] php cute proxy  script <br> http  https  get  post  file  ftp ";

}

function  get($url){

	echo  file_get_contents($url);

}


function post($url, $post = null)
{
 
	$context = array();

	if (is_array($post))
	{
		ksort($post);

		$context['http'] = array
		(
		'method' => 'POST',
		'content' => http_build_query($post, '', '&'),
		);
	}
 	echo  file_get_contents($url, false, stream_context_create($context));
}






?>
